vue对于ntko的应用经验 | 您所在的位置:网站首页 › ie 不能装载文档控件 › vue对于ntko的应用经验 |
本来生活过的美滋滋,突然告知要用ntko写一个操作word文档的界面,看到后立马提起兴致看了下ntko的基本文档,安装ntko,研究小demo。研究完后心里立刻妈卖批了,这个ntko居然限制游览器与word版本,可把我研究苦了。chrome45后就限制了插件入口,firfox跟chrome差不多,所以只能用一些特定的进行开发。 1.开发环境选择使用的是 IE11,word2016(QQ游览器与360游览器拥有ie11的内核也可以使用,注意不要使用chrome的开发者工具) ie11注意查看文档需要进行安全站点的检查,不然ActiveWindow获取不到,以下是设置方式图 ntko嵌入到vue项目里可真是让人头秃呀,ie游览器加这个控件真的法力无边,彻底把我打磨成一个特别有耐心与好脾气的人。我们接下来说明可能出现的问题。 (1).ntko的demo使用的是script进行插入与监控,vue中的根本就识别不了script 通过$(’#id’).apend(script)进行插入,注意ntkoofficecontrol.min.js文件中的 if (browser=="IE"){ if(window.navigator.platform=="Win32"){ document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } if(window.navigator.platform=="Win64"){ document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write(' '); document.write('不能装载文档控件。请在检查浏览器的选项中检查浏览器的安全设置。 '); document.write(''); } } else if (browser=="firefox"){ document.write(''); document.write('尚未安装NTKO Web FireFox跨浏览器插件 '); document.write(' '); }else if(browser=="chrome"){ document.write(' |
CopyRight 2018-2019 实验室设备网 版权所有 |